package com.tsd.core.openweixin.model;

import java.io.Serializable;

/**
 * @author mayun
 */
public class WechatMessageResult4AccessToken implements Serializable {
    //{"access_token":"47_viSwn3vqSLQvZmN07XCJDtZD2OG_G8qeuDqj4cWMcGJPOS_vWaZrV6FLu4_F-m7qG7_RmVkGQCA94dKFIK3mg7fcXBEiQ9qH6qeViSD41Lw",
    // "expires_in":7200,
    // "refresh_token":"47_-EHgFtqCyuU4hzURtyYlrxZYSxqZ8bpiFZ9rgJKYVsU3KsSv-PvORSZ5R3Q5cE3qWdK0zu6g986DHKwZ3DWcFgwIyFJ6vCqRKjrHo3xOyVY",
    // "openid":"oPt2Ivyz3-yNQtfY5IBiF5_tENo4",
    // "scope":"snsapi_login","unionid":"of3rz1UotRdhG0_6IsUjQoZl2gb8"}
    private String errcode;
    private String errmsg;
    private String access_token;
    private Integer expires_in;
    private String refresh_token;
    private String openid;
    private String scope;
    private String unionid;

    public boolean isSuccess() {
        return errcode == null || "0".equals(errcode);
    }

    public String getErrcode() {
        return errcode;
    }

    public void setErrcode(String errcode) {
        this.errcode = errcode;
    }

    public String getErrmsg() {
        return errmsg;
    }

    public void setErrmsg(String errmsg) {
        this.errmsg = errmsg;
    }

    public String getAccess_token() {
        return access_token;
    }

    public void setAccess_token(String access_token) {
        this.access_token = access_token;
    }

    public Integer getExpires_in() {
        return expires_in;
    }

    public void setExpires_in(Integer expires_in) {
        this.expires_in = expires_in;
    }

    public String getRefresh_token() {
        return refresh_token;
    }

    public void setRefresh_token(String refresh_token) {
        this.refresh_token = refresh_token;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getScope() {
        return scope;
    }

    public void setScope(String scope) {
        this.scope = scope;
    }

    public String getUnionid() {
        return unionid;
    }

    public void setUnionid(String unionid) {
        this.unionid = unionid;
    }
}
